package kassiopeia.commons.model.task;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamImplicit;

@XStreamAlias("task")
public final class TaskDescriptor implements Serializable {

    private static final long serialVersionUID = 3140098570359207020L;

    private String description;

    private String name;

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    @XStreamImplicit(itemFieldName="plugin")
    private List<PluginInstance> plugins = new ArrayList<PluginInstance>();

    @XStreamImplicit(itemFieldName="connection")
    private List<Connection> connections = new ArrayList<Connection>();

    public TaskDescriptor() {}


    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public List<Connection> getConnections() {
        return connections;
    }

    public void setConnections(List<Connection> connections) {
        this.connections = connections;
    }

    public List<PluginInstance> getPlugins() {
        return plugins;
    }

    public void setPlugins(List<PluginInstance> plugins) {
        this.plugins = plugins;
    }
}
